#!/bin/bash
string="abcd"
echo ${#string}
echo ${#string[0]}
# 变量为数组时，${#string}等价于${#string[0]}
